<?php
/**
 * 
 * 微信支付API异常类
 * @author widyhu
 *
 */
class WxPayException extends Exception {
	protected $errorCode;
	protected $errorMessage;
	/**
	 *
	 * @param unknown $code
	 *        	code和message使用父类的属性
	 * @param unknown $message
	 *        	code和message使用父类的属性
	 * @param string $previous        	
	 */
	//public function __construct($message, $code='2') {
	//	parent::__construct($message,$code);
	//	$this->errorCode = $code;
	//	$this->errorMessage = $message;
	//}

	//public function getError() {
	//	$error = array(
	//			'error' => array(
	//					'code' => $this->errorCode,
	//					'descrption' => $this->errorMessage
	//				)
	//			);
	//	return json_encode($error) . "\n";
	//}
    
	public function errorMessage()
	{
		//$errorMsg = $this->getMessage().' is not a valid E-Mail address.';
		//return $errorMsg;
		return $this->getMessage();
	}
}
